<?php
	include("./public/conn.php");
	include("config.php");
		$a='';
	if(isset($_SESSION['uname'])){
		$a.=$_POST['price']*$_POST['stocks'];
		if(isset($_COOKIE['gwc'])){
		@$ygwc=$_COOKIE['gwc'];
		setcookie('gwc',$ygwc."#".$_POST['id']."@".$_POST['stocks'].'@'.$_POST['price']);
		}else{
		setcookie('gwc',"#".$_POST['id']."@".$_POST['stocks']."@".$_POST['price']);
		}
	}else{
		$a.="back_login";
	}
	$smarty->assign('gwc',$a);
	
	$smarty->display('ajax_gwc.html');
	



?>